1. Technical Field
The invention of this application relates to a method of sorting a file and an apparatus therefor, which are suitably applied in order to produce a candidate-file list of the files that in the hierarchy storage management system are moved from a memory whose speed is high and whose capacity is small to a memory whose speed is low and whose capacity is large.
2. Description of the Related Art
In a computer, regarding a memory that is used to store therein files of program data, files of data to be processed (such as text data, image data and the like), etc. there has hitherto been a demand for more increase in capacity as the file size increases. Simultaneously, there has hitherto been a demand for more increase in speed (decrease in the access length of time) in order to shorten the processing length of time of the computer.
With the use of only one kind of memories, it is in reality impossible to make such increase both in capacity and in speed go together. For this reason, generally, in computers, a hierarchy storage management (Hierarchy Storage Management) system has been adopted.
In the hierarchy storage management system, there is used a memory that has a hierarchical construction wherein a high-speed and small-capacity memory (buffer memory) and a low-speed and large-capacity memory (main memory, external memory device) are used in combination. And the processing unit of the computer executes a program for realizing the hierarchy storage management (that is also called xe2x80x9can HSM softwarexe2x80x9d by taking the capital letters of the Hierarchy Storage Management). And the unit thereby investigates whether the file that has been requested to be accessed exists within the buffer memory. If this file exists, the computer reads it out from the buffer memory. If it does not exist, the computer transfers it to the buffer memory from the main memory or the external memory and thereafter reads it out from the buffer memory.
As a result of this, since the file for which access request has been made even once is stored in the buffer memory, regarding this file it results that access is made to the buffer memory. The file for which access request has been made once has a general tendency (the localization of the access) that there is a high possibility of the access request being made again in the near future. Therefore, with the file for which access request is highly possibly made being stored in the buffer memory in this way, the frequency of access to the main memory or external memory device is decreased. Thereby, the average access length of time is shortened (namely, the increase both in capacity and in speed go together).
Meanwhile, since the buffer memory is small in capacity, a space area thereof becomes gradually smaller as long as files are only kept transferring from the main memory or the external memory device and finally it becomes impossible for new files to be transferred to the buffer memory. Therefore, the HSM software also needs to have an additional function of replacing a prescribed amount of files of the files already stored in the buffer memory with files that are newly transferred (e.g., after this prescribed amount of files is moved again from the buffer memory to the main memory or the external memory device, new files are transferred to the buffer memory).
In the conventional HSM software, the production of a candidate-file list of the files becoming an object to be replaced with such new transfer files (namely the sorting of the files that are taken up as candidate files) was performed, for example, as follows.
That is, regarding the respective files within the buffer memory, based on:
(11) the number of lapse days that lapse from the last access day of a file (day),
(12) the weight of the number of lapse days,
(13) the file size (kilobyte), and
(14) the weight of the file size, a calculation of the score is performed using the following equation (a).
xe2x80x83Score=(11)xc3x97(12)+(13)xc3x97(14)xe2x80x83xe2x80x83(a)
It is to be noted that the weights (12) and (14) are the ones which represent as an integer the ratio between the number of lapse days under the assumption that 1 day=1 kilobyte, for example and the file size. Also, there sometimes occurs a case where without using these weights the score is calculated by only using the lapse days number (11) and the file size (13).
And, by re-arranging the respective files in the sequential order from the file whose score is larger, a candidate-file list is produced.
After having produced a candidate-file list in this way, when performing actual replacement, the prescribed amount of files that is inserted in the upper sequential order of this candidate-file list is replaced with new transfer files.
By selecting a file as a candidate in the order of the file whose lapse days number from the day of the last access or the file whose file size is large in the above-described way, the one of the files within the buffer memory for which no recent access request is made (i.e., the file which since it is less likely that access request will be made again in the near future does not contribute to shortening the access length of time very much even if kept stored within the buffer memory), the one which occupies a large area (i.e., the file which gives a great effect on the enlargement of a space area by being replaced), etc. are preferentially replaced with new transfer files.
However, even the file whose lapse days number from the day of the last access is small is not always requested to be accessed again in the near future. Namely, among these files there can also exist the one whose last renewal day (the day on which the contents of the file were renewed last) is pretty old and which although the user recently casually accessed it is not destined to being accessed thereafter for a while.
However, in the conventional hierarchy storage management system, it is impossible that such a file is inserted in the upper order of the candidate-file list, unless its file size is extremely large. As a result, although such a file does not contribute to shortening the access length of time even if the file is kept stored within the buffer memory, it did not happen that such the file was preferentially replaced with a new transfer file.
Also, there may be a case where, of the files within the buffer memory, the user thinks he wants to more preferentially replace the file whose file size is large than the file whose lapse days number from the day of the last access is large, with a new transfer file, or may be a case where, conversely, the user thinks he wants to more preferentially replace the file whose lapse days number from the day of the last access is large than the file whose file size is large, with a new transfer file.
However, in the conventional hierarchy storage management system, as in the above-described equation (a), the score is calculated according solely to only the lapse days number from the day of the last access, the file size, and the weights that are primarily determined from the lapse days number and the file size. Therefore, there was no room for the user to flexibly decide which one of the file whose lapse days number from the day of the last access is large and the file whose file size is large he selectively preferentially replaces with a new transfer file.
Also, as in the case of the directories of, for example, an IBM-compatible personal computer, generally, the operating system (OS) of each of personal computers is equipped with the function of keeping files in custody by sorting them. In many cases, the user keeps a plurality of mutually associated files (e.g., the files associated with the same theme or the ones associated with the same customer) under the same directory. Accordingly, the files under the same directory are more likely to be simultaneously accessed when the user performs his search, etc.
Also, generally, the operating system (OS) is also equipped with the function of restoring the files that have been erroneously deleted. However, for example, in the IBM-compatible personal computer, this restoration of these files is also performed in units of a directory.
However, in the conventional hierarchy storage management system, even when the files that fall under the same directory are stored in the buffer memory, the production of a candidate-file list is performed completely independently of this storage.
Therefore, when replacing, there becomes large in number a case where only part of the files under this directory that has been inserted in the upper order of the candidate-file list is replaced with a new renewal file. And the remaining files are kept stored in the buffer memory as they are. In such a case, when a search, restoration, etc. is performed regarding the files under this directory, it becomes necessary that access be made to both of the main memory or external memory device and the buffer memory. As a result, the processing length of time such as a search, restoration, etc. inconveniently becomes large.
Also, regarding a plurality of ones of the files under this directory that have become destined to being replaced with new transfer files as well, due to their sequential orders in the candidate-file list being not successively determined, there become many cases where those files are discretely replaced (when they have been moved to the main memory or external memory device they are stored in their mutually separated areas). In such a case, when performing a search, restoration, etc. regarding the files under this directory, with respect to the main memory or external memory device access must be made to mutually separate areas thereof. As a result, the processing length of time such as a search, restoration, etc. none the less becomes large.
Accordingly, an object of the present invention is to enable, in a computer of hierarchy storage management type, preferentially replacing with a new transfer file the file whose last renewal day is old and which although having been recently casually accessed are not planned to be accessed thereafter for a while, flexibly deciding on the side of the user which one of the file whose lapse days number from the day of the last access is large and the file whose file size is large the user more preferentially replaces with a new transfer file, or collectively replacing a plurality of files under the same directory within the buffer memory with new transfer files.
It is to be noted that, in the specification of this application, it is defined that a thing which corresponds to the directory in the OS of each of various kinds of computers (for example, a folder corresponds to such a thing in the case of a Macintosh personal computer) is generically called xe2x80x9ca custody structurexe2x80x9d.
In order to attain the above object, the present applicant proposes as described in claim 1 a method of selecting a file comprising a step of setting as lapse date conditions either one of a day on which the last renewal was made and a day on which the last access was made, a step of procuring information on the set lapse date conditions and information on the file size regarding each one of a plurality of files stored in the memory means, a step of calculating a score regarding each of the respective files according to the number of days that have lapsed from the lapse date conditions and the file size, and a step of selecting a desired file from among the respective files by using the score.
According to this method of sorting, when setting either one of the day of the last renewal and the day of the last access as the lapse date conditions, a file is selected from among a plurality of the files stored in the memory means by using the score that has been calculated according to the lapse days number from the lapse date conditions and the file size.
Accordingly, in a case where to set the day of the last renewal as the lapse date conditions, a file is selected using the score that has been calculated according to the lapse days number from the day of the last renewal and the file size. On this account, if applying this selecting method to a computer of hierarchy storage management type and thereby producing a candidate-file list, it is possible to insert into the upper sequential order of the candidate-file list a file whose last renewal day is old and which although having recently been casually accessed is not planned to be thereafter accessed for a while. Therefore, it becomes possible to replace such a file with a new transfer file with a priority.
Also, the present applicant proposes as described in claim 2 an apparatus for selecting a file comprising setting means for setting as lapse date conditions either one of a day on which the last renewal was made and a day on which the last access was made, procuring means for procuring information on the lapse date conditions and information on the file size regarding each one of a plurality of files stored in the memory means, calculating means for calculating a score regarding each of the respective files according to the number of days that have lapsed from the lapse date conditions and the file size, and selecting means for selecting a desired file from among the respective files by using the score.
According to this apparatus for selecting, by the user""s performing setting with setting means and by the procuring means, the calculating means, and the selecting means performing the procurement of the information, the calculation of the score, and the selection of the file, it is possible to execute the method described in claim 1 . On this account, if applying this selecting apparatus to a computer of hierarchy storage management type and thereby producing a candidate-file list, it is similarly possible to replace a file whose last renewal day is pretty old and which although having recently been casually accessed is not planned to be thereafter accessed for a while with a new transfer file with a priority.
Next, the present applicant proposes as described in claim 3 a method of selecting a file comprising a step of setting at least one of a multiplication factor used with respect to the number of days that have lapsed from a day on which the last access was made and a multiplication factor used with respect to the file size, a step of procuring information on a day on which the last access was made and information on the file size regarding each one of a plurality of files stored in the memory means, a step of calculating a score regarding each of the respective files according to the number of days that have lapsed from the day of the last access and the value obtained by multiplying the file size by the multiplication factor that has been set, and a step of selecting a desired file from among the respective files by using the score.
According to this method of selecting a file, when setting at least one of the multiplication factor used with respect to the number of days that have lapsed from a day on which the last access was made and the multiplication factor used with respect to the file size, a file is selected from among a plurality of the files stored in the memory means by using the score that has been calculated according to the lapse days number from the day of the last access and the value obtained by multiplying the file size by this multiplication factor.
Accordingly, by changing the multiplication factor he sets, the user can change the largeness/smallness relationship between the score of a file whose lapse days number is large and the score of a file whose size is large. Therefore, if applying this selecting method to the computer of hierarchy storage management type and thereby producing a candidate-file list, the user becomes able to flexibly decide that the user more preferentially replaces which one of the file whose lapse days number from the day of the last access is large and the file whose size is large with a new transfer file.
Also, the present applicant proposes as described in claim 4 an apparatus for selecting a file comprising setting means for setting at least one of a multiplication factor used with respect to the number of days that have lapsed from a day on which the last access was made and a multiplication factor used with respect to the file size, procuring means for procuring information on a day on which the last access was made and information on the file size regarding each one of a plurality of files stored in the memory means, calculating means for calculating a score regarding each of these respective files according to the number of days that have lapsed from the day of the last access and the value obtained by multiplying the file size by the multiplication factor that has been set by the setting means, and selecting means for selecting a desired file from among those respective files by using the score.
According to this apparatus for selecting, by the user""s performing setting with setting means and by the procuring means, the calculating means, and the selecting means performing the procurement of the information, the calculation of the score, and the selection of the file, it is possible to execute the method described in claim 3. On this account, if applying this selecting apparatus to the computer of hierarchy storage management type and thereby producing a candidate-file list, the user becomes able to flexibly decide that the user more preferentially replaces which one of the file whose lapse days number from the day of the last access is large and the file whose size is large with a new transfer file.
Next, the present applicant proposes as described in claim 5 a method of selecting a file comprising a step of setting whether files under the same custody structure are preferentially selected, a step of procuring information on a day on which the last access was made and information on the file size regarding each one of a plurality of files stored in the memory means, a step of calculating a score regarding each of these respective files according to the number of days that have lapsed from the day of the last access and the file size, and a step of selecting a desired file from among these respective files by using the score and the result of the setting regarding whether files under the same custody structure are preferentially selected.
According to this method of selecting a file, when setting whether preferentially selecting a file under the same custody structure (e.g., the directory), a file is selected from among a plurality of files stored in the memory means by using the score that has been calculated according to the lapse days number from the day of the last access and the file size and the result of the setting regarding whether preferentially selecting a file under the same custody structure. Accordingly, in a case where having set so that the file under the same custody structure may be preferentially selected, when selecting a file, it is not the case that files are merely selected in the order in which the score is larger but the files under the same custody structure are preferentially selected.
For this reason, if applying this selecting method to the computer of hierarchy storage management type and thereby producing a candidate-file list, a plurality of files under the same custody structure within the buffer memory become able to be inserted in the same sequential order of the candidate-file list or in the successive sequential orders thereof.
As a result of this, a plurality of ones of the files under this custody structure that have been destined to being replaced with new transfer files are collectively replaced in a lump. Therefore, when having been moved to the main memory or external memory device, it becomes more likely to happen that they are stored in successive areas within this memory or memory device. As a result, when performing a search, restoration, etc. with respect to the files under this custody structure, as far as the main memory or external memory device is concerned, in an increasing number of cases it has become sufficient to give access to only the successive areas. And so it becomes possible to shorten the processing length of time such as that for a search, restoration, etc. to that extent.
Further, there has increased in number either a case where the files under this custody structure are all collectively replaced with new transfer files or a case where these files are all kept stored in the buffer memory as are. As a result, when performing a search, restoration, etc. withe respect to the files under this custody structure, in a growing number of cases it becomes sufficient to have access to only either one of the main memory or the external memory device. And so it becomes possible to shorten the processing length of time such as that for a search, restoration, etc. to that extent.
Also, the present applicant proposes as described in claim 6 an apparatus for selecting a file comprising setting means for setting whether files under the same custody structure are preferentially selected, procuring means for procuring information on a day on which the last access was made and information on the file size regarding each one of a plurality of files stored in the memory means, calculating means for calculating a score regarding each of these respective files according to the number of days that have lapsed from the day of the last access and the file size, and selecting means for selecting a desired file from among the respective files by using the score and the result of the setting performed by the setting means.
According to this apparatus for selecting, by the user""s performing setting with setting means and by the procuring means, the calculating means, and the selecting means performing the procurement of the information, the calculation of the score, and the selection of the file, it is possible to execute the method described in claim 5. On this account, if applying this selecting apparatus to a computer of hierarchy storage management type and thereby producing a candidate-file list, it is none the less possible to collectively replace a plurality of files under the same directory within the buffer memory with new transfer files. And so it becomes possible to shorten the processing length of time such as that for a search, restoration, etc. with regard to the files under this custody structure.